package com.koron.common.core.business.workflow.bean.param;

import com.koron.bean.query.Page;
import com.koron.common.core.business.workflow.bean.result.FlowList;
import com.koron.common.core.config.ThreadLocalContext;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author jzp
 * @since 2021/3/30 18:40
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ListParam extends Page<FlowList> {
    private BaseParam baseParam;

    @ApiModelProperty("操作人")
    private String operator;

    private String billId;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("开始时间")
    private String startDate;

    @ApiModelProperty("结束时间")
    private String endDate;

    @ApiModelProperty("类型<br/>1我发起的<br>2我待审的（未办理、可认领、可沟通）<br>3参与的(我发起、我已办理、我已沟通)<br>4我已沟通的<br>5我已办的（包含我发起和我已经办，不含待审）")
    private Integer type = 2;
    private Integer status = 0;

    public String getOperator() {
        if (operator == null) {
            operator = ThreadLocalContext.get().getAccount();
        }
        return operator;
    }
}
